package com.wl.dzt.sys.ui.ext.view;

import com.wl.dzt.sys.controller.result.ActionResult;
import com.wl.dzt.sys.controller.view.View;
import com.wl.dzt.sys.ui.ext.Ext;
import com.wl.dzt.sys.util.WebUtils;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author wl_code@163.com
 * @version 1.0
 * @date 2018/7/5/005
 * @description ext加载视图
 */
@Component
public class ExtLoadView implements View {

    /**
     * <b>加载视图</b>

     *
     * @param actionResult
     * @param response
     * @param request
     * @return
     */
    public String doView(ActionResult actionResult, HttpServletResponse response, HttpServletRequest request) {
        WebUtils.json(Ext.extLoad(actionResult.getEntity()), response);
        return null;
    }

}
